[HUDI-3404] Automatically adjust write configs based on metadata table and write concurrency mode#4975
Conversation
nsivabalan
left a comment
There was a problem hiding this comment.
if I am not wrong, we discussed that w/ deltatstreamer, its not easy to distinguish if async table services are enabled since no explicit configs are set. So, don't we need some fix in deltastreamer class towards this ?
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java
Show resolved
Hide resolved
|
based on our discussion, lets add table type check and check for compaction only for MOR. |
I added the logic based on table type. By default COW table should not have any async table service enabled, while MOR table have async compaction enabled. So the auto config adjustment for metadata table is different for different types of tables. |
0c1aad3 to
1bc5f11
Compare
|
Good job on the patch Ethan! |
…e and write concurrency mode (apache#4975)
…e and write concurrency mode (apache#4975)
What is the purpose of the pull request
This PR adds logic to automatically adjust write configs based on metadata table enablement and write concurrency mode, to prevent possible missing configs that are required for enabling metadata table and multi-writer. Write configs in scope are:
The following scenarios are checked:
hoodie.write.concurrency.mode=optimistic_concurrency_control,hoodie.write.lock.provider=org.apache.hudi.client.transaction.lock.InProcessLockProviderandhoodie.cleaner.policy.failed.writes=LAZYhoodie.cleaner.policy.failed.writes=LAZYif user has sethoodie.write.concurrency.mode=optimistic_concurrency_controlhoodie.cleaner.policy.failed.writes=LAZYif user has sethoodie.write.concurrency.mode=optimistic_concurrency_controlhoodie.cleaner.policy.failed.writes=LAZYif user has sethoodie.write.concurrency.mode=optimistic_concurrency_controlNote that the logic also depends on Hudi table type, since by default, MOR table has async compaction enabled, while COW table has all inline table services.
Brief change log
HoodieWriteConfig.TestHoodieWriteConfigto make sure the logic is correct.Verify this pull request
This change adds tests in
TestHoodieWriteConfigto verify the logic.Committer checklist
Has a corresponding JIRA in PR title & commit
Commit message is descriptive of the change
CI is green
Necessary doc changes done or have another open PR
For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.